package com.hsyt.pms.sys;

import com.alibaba.dubbo.container.Main;
import com.alibaba.dubbo.spring.boot.annotation.EnableDubboConfiguration;
import com.alibaba.dubbo.spring.boot.context.event.DubboBannerApplicationListener;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.Banner;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ImportResource;

/**
 * @Description: System微服务启动
 * @ClassName: SysServerApplication
 * @Package: com.hsyt.pms.sys
 * @Author: wangze@hsyuntai.com
 * @Date: 2019/02/01 19:26
 * @Copyright: 版权归 HSYUNTAI 所有
 */
@MapperScan("com.hsyt.pms.orm.sys")
@EnableDubboConfiguration
@EnableCaching
@SpringBootApplication(scanBasePackages = {"com.hsyt.pms.sys"})
@ImportResource(locations= {"classpath:spring-dubbo.xml"})
public class SysServerApplication {

    public static void main(String[] args) {
        DubboBannerApplicationListener.setBANNER_MODE(Banner.Mode.OFF);
        new SpringApplicationBuilder().sources(SysServerApplication.class).web(false).run(args);
        Main.main(null);
    }
}
